package com.liu.demo.payment;

import com.liu.demo.payment.config.PaymentConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liujiazhong
 */
@RestController
@SpringBootApplication
@EnableConfigurationProperties({PaymentConfig.class})
public class PaymentApplication {

    @Autowired
    private PaymentConfig paymentConfig;

    @GetMapping("paymentInfo")
    public String info() {
        return paymentConfig.getInfo();
    }

    public static void main(String[] args) {
        SpringApplication.run(PaymentApplication.class, args);
    }

}
